/**
 * 
 */
package vue.session;

import java.util.Set;

import model.session.ExecutableSessionBlock;

/**
 * An {@link IGExecutionBlock} is a block for a running execution, it is somehow associate to
 * {@link ExecutableSessionBlock}. Basically all we know is its description and status.
 * 
 * @author GRONOWSKI Stephane svan001@aol.com
 * 
 *         igsat 2010
 * 
 */
public class IGExecutionBlock extends IGBlock {

	protected ExecutableSessionBlock	exec	= null;
	protected IGCNFUse					cnfuse	= null;

	/**
	 * Create an {@link IGExecutionBlock}.
	 * 
	 * @param cnfuse
	 *            the {@link IGCNFUse} the execution waslunched on.
	 * 
	 * @param exec
	 *            the {@link ExecutableSessionBlock} associate.
	 */
	public IGExecutionBlock(IGCNFUse cnfuse, ExecutableSessionBlock exec) {
		this.exec = exec;
		this.cnfuse = cnfuse;
	}


	/**
	 * Create an {@link IGExecutionBlock}.
	 * 
	 * @param cnfuse
	 *            the {@link IGCNFUse} the execution waslunched on.
	 * 
	 * @param exec
	 *            the {@link ExecutableSessionBlock} associate.
	 * @param listeners
	 *            a set of {@link IIGModificationListener}.
	 */
	public IGExecutionBlock(IGCNFUse cnfuse, ExecutableSessionBlock exec, Set<IIGModificationListener> listeners) {
		super(listeners);
		this.cnfuse = cnfuse;
		this.exec = exec;
	}


	/**
	 * Return the {@link ExecutableSessionBlock} associate.
	 * 
	 * @return the {@link ExecutableSessionBlock} associate.
	 */
	public ExecutableSessionBlock getExec() {
		return exec;
	}

	/**
	 * Set the {@link ExecutableSessionBlock} associate.
	 * 
	 * @param exec
	 *            the {@link ExecutableSessionBlock} associate to set
	 */
	public void setExec(ExecutableSessionBlock exec) {
		this.exec = exec;
	}

	/**
	 * Return the {@link IGCNFUse} associate.
	 * 
	 * @return the {@link IGCNFUse} associate.
	 */
	public IGCNFUse getCnfuse() {
		return cnfuse;
	}

	/**
	 * set the {@link IGCNFUse} associate.
	 * 
	 * @param cnfuse
	 *            the {@link IGCNFUse} to set
	 */
	public void setCnfuse(IGCNFUse cnfuse) {
		this.cnfuse = cnfuse;
	}
}
